/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.prime.component;

import java.util.UUID;

/**
 *
 * @author stevenziggiz
 */
public abstract class Component implements Cloneable{
    private final UUID ID;
    private String name;
    private ComponentType type; 
    private String FormatType;
    private String edit;
    private String ColumnReference;
    private String ColumnLabel;
    private String chilTable;

    public Component() {
        ID = UUID.randomUUID();
        FormatType = "String";
        edit = "true";
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Component)) {
            return false;
        }
        Component comp = (Component) obj;
        if(comp.getID().equals(ID)){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 59 * hash + (this.ID != null ? this.ID.hashCode() : 0);
        return hash;
    }

    @Override
    public Component clone() throws CloneNotSupportedException {
        Component comp = (Component) super.clone();        
        return comp;
    }
    
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the type
     */
    public ComponentType getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(ComponentType type) {
        this.type = type;
    }

    /**
     * @return the ID
     */
    public UUID getID() {
        return ID;
    }

    /**
     * @return the FormatType
     */
    public String getFormatType() {
        return FormatType;
    }

    /**
     * @param FormatType the FormatType to set
     */
    public void setFormatType(String FormatType) {
        this.FormatType = FormatType;
    }

    /**
     * @return the edit
     */
    public String getEdit() {
        return edit;
    }

    /**
     * @param edit the edit to set
     */
    public void setEdit(String edit) {
        this.edit = edit;
    }

    /**
     * @return the ColumnReference
     */
    public String getColumnReference() {
        return ColumnReference;
    }

    /**
     * @param ColumnReference the ColumnReference to set
     */
    public void setColumnReference(String ColumnReference) {
        this.ColumnReference = ColumnReference;
    }

    /**
     * @return the ColumnLabel
     */
    public String getColumnLabel() {
        return ColumnLabel;
    }

    /**
     * @param ColumnLabel the ColumnLabel to set
     */
    public void setColumnLabel(String ColumnLabel) {
        this.ColumnLabel = ColumnLabel;
    }

    /**
     * @return the chilTable
     */
    public String getChilTable() {
        return chilTable;
    }

    /**
     * @param chilTable the chilTable to set
     */
    public void setChilTable(String chilTable) {
        this.chilTable = chilTable;
    }
    
}
